<?php
namespace app\admin\controller;

use app\admin\my\MyPage;
use app\admin\my\MyConfig;

class Test extends Base {
    public function test() {
        $my = new MyPage();
        $my->title('测试')
        	->setDb('test')
            ->buttonNew()
            ->keyId()
            ->keyText('multiimage', '多图片')
            // ->actionEdit()
            ;
        if ( request()->isAjax() ) {
        	$data = my_data($my, 'test');
            return $data;
        } else {
            return $my->fetch();
        }
    }
    public function testedit() {
    	if ( request()->isPost() ) {
           // $res = model('admin/Shop')->editData();

           // if ( $res>0 ) $this->success('更新成功', 'test');
           // $this->error('更新失败');
        } else {
            $data = my_edit('test', $id);
            $my = new MyConfig();
            return $my->title("编辑分店")
            	->keyId()
                ->keyMultiImage('title', '多图片')
              
                ->data($data)
                ->fetch();
        }
    }
}